<template>
  <div class="FcUpload">
    <el-upload
        v-model:file-list="showValue"
        v-bind="attrs"
    >
      <el-button type="primary">上传文件</el-button>
      <template #tip>
        <div class="el-upload__tip">
          jpg/png files with a size less than 500KB.
        </div>
      </template>
    </el-upload>
  </div>
</template>
<script setup name="FcUpload">
const attrs = useAttrs();
const emit = defineEmits(['update:modelValue'])
const props = defineProps({
  modelValue: {
    type: [Array],
    default: []
  },
  valueKey: {
    type: String,
    default: ''
  },
  labelKey: {
    type: String,
    default: ''
  }
})
const showValue = computed({
  get() {
    return props.modelValue
  },
  set(val) {
    emit('update:modelValue',
        val)
  }
})
</script>
<style scoped lang="scss">
.FcUpload {
}
</style>
